package c_gs

import (
	"cade/src/game/app"
	"cade/src/game/app/modules/chat"
	"cade/src/game/msg"
)

func C_ChatLeaveRoom(message msg.Message, ctx interface{}) {
	// req := message.(*msg.C_ChatLeaveRoom)
	plr := ctx.(*app.Player)

	res := &msg.GS_ChatLeaveRoom_R{}

	chat.LeaveRoom(plr, func(ec int32) {
		res.ErrorCode = ec
		plr.SendMsg(res)
	})
}
